import { IsArray, IsInt, IsNotEmpty, IsOptional } from "class-validator";
import { Type } from "class-transformer";

export class CreateDemoReDto {
  @IsNotEmpty()
  id: number

  @IsNotEmpty()
  label: string

  @IsNotEmpty()
  @Type(() => Number)
  value: number

  @IsNotEmpty()
  color: string

  @IsOptional()
  sort: number

  @IsArray()
  @Type(() => Number)
  // @IsInt({ each: true })
  rgb: number[]
}
